package com.accesshollywood.grfxOrdering.Dialogs;

import java.awt.Window;

import javax.swing.JProgressBar;

import org.jdesktop.swingx.VerticalLayout;

public class ProgressBarDialog extends AbstractCustomDialog {
	public JProgressBar	pBar;

	public ProgressBarDialog(Window w, ModalityType modality) {
		super(w, modality);
		createDialog();
	}

	public void createDialog() {
		setBounds(0, 0, 450, 150);
		setLayout(new VerticalLayout());
		pBar = new JProgressBar(0, 100);

		add(pBar);

		setLocationRelativeTo(null);
	}

	public void setMax(int max) {
		pBar.setMaximum(max);
	}
	
	public void setValue(int i){
		pBar.setValue(i);
		//revalidate();
		repaint();
	}
}
